package com.tianji.learning.controller;

import com.tianji.common.domain.dto.PageDTO;
import com.tianji.learning.domain.query.ReplyPageQuery;
import com.tianji.learning.domain.vo.ReplyVO;
import com.tianji.learning.service.IInteractionReplyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Xinxuan Zhuo
 * @version 2024/3/2
 * <p>
 *
 * </p>
 */

@Api(tags = "回答或评论相关接口（管理端）")
@RestController
@RequestMapping("/admin/replies")
@RequiredArgsConstructor
public class InteractionReplyAdminController {

    private final IInteractionReplyService replyService;

    /**
     * 管理端分页查询问题下的回答或者评论
     */
    @ApiOperation("分页查询问题下的回答或者评论")
    @GetMapping("/page")
    public PageDTO<ReplyVO> queryAnswerOrReplyAdmin(ReplyPageQuery query){
        return replyService.queryAnswerOrReplyAdmin(query);
    }
}
